home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
misc
/
unix
/
unix_boot.lha
/
src
/
streqn.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-12-09
|
339 b
|
16 lines
/*
* Copyright (C) 1991, Commodore Business Machines, Inc.
*
* Compare first N bytes of two strings, returning 0 if they are not
* equal and non-zero if they are.
*/
int streqn (char *s1, char *s2, int nbytes)
{
while ((*s1 != '\000') && (*s1 == *s2) && (--nbytes > 0)) {
s1++;
s2++;
}
return (*s1 == *s2);
}